package cn.yitun.chat.yitunservercommonlib.converter.dto2vo.user;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.system.user.UserDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.system.user.UserVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface UserDto2VoConverter {

    UserDto2VoConverter INSTANCE = Mappers.getMapper(UserDto2VoConverter.class);

    UserDto vo2dto(UserVo vo);

    List<UserDto> vo2dto(List<UserVo> voList);

    @InheritInverseConfiguration
    UserVo dto2vo(UserDto dto);

    @InheritInverseConfiguration
    List<UserVo> dto2vo(List<UserDto> dtoList);

}
